<template>
  <div>
    <div class="layout-min-full-height special-standard our-special py-7 pc-model">
      <div class="container">
        <div class="row">
          <div class="col-3" v-for="zt_item in special_list" :key="zt_item.product_id">
            <router-link :to="{ path: '/special/details', query: { ztPid: zt_item.pid } }" class="cursor-pointer">
              <div class="single-special-member">
                <div class="wrapper">
                  <div class="img-box">
                    <img
                      data-src="https://coding-init-1254329140.cos.ap-beijing.myqcloud.com/one.jpg"
                      :src=zt_item.imgPath></div>
                  <div class="info-meta"><h6 class="name">
                    {{ zt_item.categoryName }}
                    <span class="ml-2 text-muted fs-16">
                        ({{ zt_item.productCount }}处)
                      </span></h6></div>
                </div>
                <div class="hover-content"><p>
                  <span><i class="el-icon-position"></i></span>
                  <span><i class="el-icon-orange"></i></span>
                </p>
                </div>
              </div>
            </router-link>
          </div>
        </div>
        <div class="clearfix pt-8"></div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      special_list: "",
    };
  },
  mounted() {
    //获取所有专题（飞猫优选）
    this._getSpecialList()
  },
  methods: {
    _getSpecialList() {
      this.$axios
        .post("/cat/productCategory/getCategory/" + 2)
        .then((res) => {
          this.special_list = res.data.data.categoryList;
        })
        .catch((err) => {
          console.log("error");
          return Promise.reject(err);
        });
    }
  }
};
</script>

<style scoped>
@import "../../assets/css/macw.css";
</style>
